package com.hotel.sampleTool;

import java.util.List;

import com.hotel.BL.MasterCreator;

import data.CurrencyMaster;
import data.DateTimeFormatMaster;
import data.LanguageMaster;
import data.PayModeMaster;

public class MasterCreatorSample extends RequestSampleData {

	MasterCreator creator = new MasterCreator();
	
	@Override
	public void CreateSample() {
		CreateSample(1);
	}

	@Override
	public void CreateSample(int iteration) {
		CreateLanguageMaster();
		CreateCurrencyMaster();
		CreateDateTimeFormatMaster();
	}

	public void CreateLanguageMaster()
	{
		List<LanguageMaster> lang = creator.CreateLanguageMaster();
		for(LanguageMaster l : lang)
			datastore.put(l.getEntity());
	}
	
	public void CreateCurrencyMaster()
	{
		List<CurrencyMaster> currency = creator.CreateCurrencyMaster();
		for(CurrencyMaster c : currency)
			datastore.put(c.getEntity());
	}

	public void CreateDateTimeFormatMaster()
	{
		List<DateTimeFormatMaster> format = creator.CreateDateTimeFormatMaster();
		for(DateTimeFormatMaster f : format)
			datastore.put(f.getEntity());
	}
	
	public void CreatePayModeMaster(){
		List<PayModeMaster> master = creator.CreatePayModeMaster();
		for(PayModeMaster n : master)
			datastore.put(n.getEntity());
	}
}
